﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Web;
using System.Web.Http;

namespace UFIDA.U8.BJSOFT.LF.MES.WEBAPI.Controllers
{
    public class VoucherRD02Controller : ApiController
    {
        /// <summary>
        /// 委外入库单新增接口
        /// </summary>
        /// <param name="json">参数</param>
        /// <returns>UserTest</returns>
        [HttpPost]
        public HttpResponseMessage VoucherRD01([FromBody] dynamic json)
        {
            string filename = "委外入库";
            string jsons = Convert.ToString(json);
            DBHelp.LogException.WriteiLog(filename, "当前接收到的JSON:" + jsons, DBHelp.LogException.ilog, false);
            var products = Method.AddRD02.Insert(filename, jsons);//调用接口方法
            DBHelp.LogException.WriteiLog(filename, "接口调用结果:" + products, DBHelp.LogException.ilog, false);
            var productss = products;
            HttpResponseMessage result = new HttpResponseMessage { Content = new StringContent(productss, Encoding.GetEncoding("UTF-8"), "application/json") };
            return result;
        }
    }
}